package com.wx.pojo.vo;
/**
 * VO:封装控制层要返回到客户端的数据
 * @author tarena
 */
public class JsonResult {
	/**我们自己设置的服务端向客户端输出的状态码*/
    private int code=0;//"0,ok;1,false"
    /**状态码state对应的具体信息*/
    private String message="ok";
    /**业务层返回给控制层的具体数据*/
    private Object data;
    
    public JsonResult(){
    }
    public JsonResult(String message){
    	this.message=message;
    }
    public JsonResult(Object data){
    	this.data=data;
    }
    public JsonResult(Throwable e){
    	this.setCode(0);
    	this.message=e.getMessage();
    }
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
     
     
}
